package com.wbt.huawei;

import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Test {

    public static void main(String[] args) throws Exception{
        //Scanner sc = new Scanner(System.in);
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        String str = null;
        while ((str = bf.readLine()) != null){
            String c = bf.readLine();
            str = str.replaceAll(c,"");
            System.out.println(str);

        }
    }
}
